package priv.yiyuan.example.design.message.decorator;

import priv.yiyuan.example.design.message.MessageSender;

/**
 * 消息压缩发送器
 * <p>
 * 装饰器模式(具体装饰器)
 *
 * @author YiYuan
 * @data 2025/8/18
 * @apoNote
 */
public class CompressedSenderDecorator extends MessageSenderDecorator {

    public CompressedSenderDecorator(MessageSender decoratorSender) {
        super(decoratorSender);
    }

    @Override
    public void send(String message) {
        String compressedMessage = "[ZIP]" + message + "[/ZIP]";
        System.out.println("消息压缩中 ... ");

        super.send(compressedMessage);
    }
}
